/**  
 * @Title: SiteInterceptorAOP.java
 * @Package com.limit.aop
 * @author maoyun(maoyun0903@163.com)
 * @date 2014-4-11 上午11:26:46
 * @version V1.0
 */ 
package com.limit.aop;

import com.jfinal.aop.Interceptor;
import com.jfinal.core.ActionInvocation;
import com.jfinal.core.Controller;
import com.limit.constant.Constant;
import com.limit.utils.PropertiesUtil;

/** 
 * <br/>
 * @author maoyun(maoyun0903@163.com)
 * @date 2014-4-11 上午11:26:46 
 * @version V1.0
 */

public class SiteInterceptorAOP implements Interceptor{

	/* 
	 * 
	 * @param ai 
	 * @see com.jfinal.aop.Interceptor#intercept(com.jfinal.core.ActionInvocation) 
	 */ 
	@Override
	public void intercept(ActionInvocation ai) {
		Controller c = ai.getController();
		ai.invoke();
		String contextPath = c.getRequest().getContextPath();
//		c.setAttr("slidePath", contextPath + Constant.slidePath);
//		c.setAttr("gameImagePath", contextPath + Constant.gameImagePath);
//		c.setAttr("androidPath", contextPath + Constant.androidFilePath);
//		c.setAttr("iosPath", contextPath + Constant.iosIpaFilePath);
		c.setAttr("basePath", contextPath);
	}

	
	
	
}
